package com.ruoyi.project.cms.project.service;

import com.ruoyi.project.cms.project.domain.Order;
import com.ruoyi.project.cms.project.domain.Process;
import com.ruoyi.project.cms.project.domain.ProcessA;
import com.ruoyi.project.cms.project.mapper.OrderMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
@Service
public class OrderServiceImpl implements OrderService {
   @Resource
   private OrderMapper orderMapper;


    @Override
    public List<Order> search() {
        List<Order> orders = orderMapper.searchAll();
        System.out.println(orders);
        return orders;
    }

    @Override
    public Order searchOne(int oid) {
        return orderMapper.searchOne(oid);
    }

    @Override
    public List<ProcessA> searchA() {
        return orderMapper.searchA();
    }

    @Override
    public List<ProcessA> searchA1(int oid) {
        return orderMapper.searchA1(oid);
    }

    @Override
    public int addProcess(Process process) {
        return orderMapper.addProcess(process);
    }

    @Override
    public int changeStaute(int pid, String staute) {
        return orderMapper.updateStatue(pid,staute);
    }


}
